<template>
  <div id="index">
    <el-container>
      <el-header>
        <IndexHeader></IndexHeader>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <IndexAside></IndexAside>
        </el-aside>
        <el-main>
          <IndexMain></IndexMain>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
import IndexHeader from "@/components/IndexHeader";
import IndexAside from "@/components/IndexAside";
import IndexMain from "@/components/IndexMain";
export default {
  created() {
    // 在本地有token的情况下，不登陆手动跳转到index页面，会触发请求，判断token是否过期
    if (localStorage.moneyToken) {
      this.$http.get("/user/indexjwt");
    }
  },
  components: {
    IndexHeader,
    IndexAside,
    IndexMain,
  },
};
</script>

<style lang="less" scoped>
#index {
  width: 100%;
  height: 100%;
  .el-container {
    height: 100%;
    .el-header {
      height: 70px !important;
      margin: 0;
      padding: 0;
    }
    .el-aside {
      // border-top: 1px solid rgb(67, 74, 80);
      background-color: rgb(84, 92, 100);
    }
    .el-main {
      padding: 0;
    }
  }
}
</style>